import { ApiProperty } from '@nestjs/swagger';
import { User, Post } from '@prisma/client';

export class RegUser {
  @ApiProperty({ description: 'email', example: '12345@qq.com', uniqueItems: true })
  email: string
  @ApiProperty({ description: '姓名', example: 'kevin' })
  name: string
}

export class UpdateUser {
  @ApiProperty({ description: '要更新用户的id', example: '1' })
  id: number
  @ApiProperty({ description: '姓名', example: 'kevin' })
  name: string
}

export class QueryUser {
  @ApiProperty({ description: '页码', example: '1', required: false })
  page?: number
  @ApiProperty({ description: '每页条数', example: '5', required: false })
  pageSize?: number
}

export class UsersDto {
  count: number
  data: User[]
}